package com.example.modelDTO.converter;

import com.example.Utils.LoggerUtils;
import com.example.model.Menu;
import com.example.modelDTO.MenuDTO;
import com.example.service.impl.AdminServiceImpl;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;

@Component
public class MenuConverter implements BaseConverter<MenuDTO, Menu>{
    private static final Logger logger = LoggerUtils.getLogger(MenuConverter.class);
    @Override
    public MenuDTO sourceToTarget(Menu var) {
        MenuDTO menuDTO = new MenuDTO();
        menuDTO.setCategoryId(var.getCategoryId());
        //logger.info("{}",menuDTO.getCategoryId());
        menuDTO.setDishName(var.getDishName());
        //logger.info("{}",menuDTO.getDishName());
        menuDTO.setDishImage(var.getDishImage());
        //logger.info("{}",menuDTO.getDishImage());
        menuDTO.setDishPrice(var.getDishPrice());
        //logger.info("{}",menuDTO.getDishPrice());
        return menuDTO;
    }
}
